//
// Created by LiuDongPeng on 2023/11/29.
//

#ifndef FOC_ENCODER_H
#define FOC_ENCODER_H



typedef struct encoder encoder_t;


typedef struct encoder
{

    int (*encoderGetDataCallback)(encoder_t* encoder, float* angle, float* angleRad);

} encoder_t;


typedef int (*encoder_get_data_callback_t)(encoder_t* encoder, float* angle, float* angleRad);


int encoder_init(encoder_t* encoder, encoder_get_data_callback_t encoderGetDataHandle);


#endif //FOC_ENCODER_H
